import request from '@/utils/request'
import Qs from 'qs'

export function listBill(query) {
  return request({
    url: '/bill/list',
    method: 'get',
    params: query,
    paramsSerializer: function(params) {
      return Qs.stringify(params, { arrayFormat: 'repeat' })
    }
  })
}

export function overview(query) {
  return request({
    url: '/bill/overview',
    method: 'get',
    params: query
  })
}

export function apply(data) {
  return request({
    url: '/bill/apply',
    method: 'post',
    data
  })
}

export function getAccountList(query) {
  return request({
    url: '/bill/getAccountList',
    method: 'get',
    params: query
  })
}

export function listSales(query) {
  return request({
    url: '/bill/listSales',
    method: 'get',
    params: query
  })
}

export function listSaleToday(query) {
  return request({
    url: '/bill/listSaleToday',
    method: 'get',
    params: query
  })
}
